/**
 * 延迟一段时间执行
 * @params delay 延迟时间，单位ms
 * 
 * @example 
 * // 示例
 * (async () => {
 *     console.time('waiting');
 *     await waiting(1500); // 延迟1.5s后执行
 *     console.timeEnd('waiting');
 * })();
 * // waiting: 1500.337646484375 ms
 */
export default (delay = 0) => new Promise((resolve) => setTimeout(resolve, delay));
